import { useRouter } from 'vue-router';

export const useNavigation = () => {
  const router = useRouter();

  const navigateTo = (path: string, query?: Record<string, any>) => {
    console.log('navigateTo >> ', path, query);
    router.push({ path, query });
  };

  const redirectTo = (url: string) => {
    window.location.href = url;
  };

  return {
    navigateTo,
    redirectTo,
  };
};
